<?php

  foreach (glob("gallery/thumbs/*.jpg") as $img) {
	$img2 = str_replace('/thumbs', '', $img);
	echo "<div class='content'><div><a href='#'><img src='$img' alt='$img2' class='thumb'></a></div></div>";
  }
?>